package com.team.recruitment_management_system.mapper;

import com.team.recruitment_management_system.pojo.entity.EducationExperience;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
* @author 86147
* @description 针对表【education_experience(教育经历表)】的数据库操作Mapper
* @createDate 2024-03-21 20:28:40
* @Entity com.team.recruitment_management_system.pojo.entity.EducationExperience
*/
@Mapper
public interface EducationExperienceMapper extends BaseMapper<EducationExperience> {
    @Select("SELECT * FROM EDUCATION_EXPERIENCE WHERE resume_id=#{resumeId};")
    List<EducationExperience> selectByResumeId(Integer resumeId);

    @Update("UPDATE EDUCATION_EXPERIENCE SET school_name=#{schoolName}," +
            "type=#{type}," +
            "education=#{education}," +
            "enrollment_year=#{enrollmentYear}," +
            "major=#{major}," +
            "graduation_year=#{graduationYear}," +
            "school_experience=#{schoolExperience}" +
            " WHERE resume_id=#{resumeId};")
    Integer updateByResumeId(EducationExperience educationExperience);
}




